import request from "../utils/request"

export async function login(params) {
    return await request({
        url: "/user",
        params: params
    })
}
export const getReigist = async (username) => {
    return request({
      url: '/user',
      params: { username }
    })
  }
  export const Reigist = async (data) => {
     try{
       await request({
        method: 'POST',
        url: '/user',
        data:{
          ...data,
          caeate:new Date(),
        }
      })
      return {code:200}
     }catch{
      return false
     }
  }

